package com.example.lib;
import com.example.lib.Flybeheaver;

public abstract class DUCK {

    Flybeheaver flybeheaver;

    Quackbeheaver quackbeheaver;

    public DUCK() {}

    public void performFly() {
        flybeheaver.fly();
    }

    public void performQuack() {
       quackbeheaver.quack();
    }
    
    public void swim(){
        System.out.println("我会游泳");
    }

    public abstract void display();

    public void setFlybeheaver(Flybeheaver flybeheaver) {
        this.flybeheaver =  flybeheaver;
    }

    public void setQuackbeheaver(Quackbeheaver quackbeheaver) {
        this.quackbeheaver=quackbeheaver;
    }
}